<?php
		include 'header.html';
		$prepaXML_serial_slash = $_POST['generer'];
		echo $prepaXML_serial_slash;
		
		$tab_general_serial_slash = $_POST['tableau'];
		var_dump ($tab_general_serial_slash);
		
        $tab_general_serial_deslash = htmlspecialchars_decode($tab_general_serial_slash);
        var_dump($tab_general_serial_deslash);
        $tab_general = unserialize($tab_general_serial_deslash);
        var_dump($tab_general);
		
		while (list($a) = each($tab_general)){
			echo "$a <br>";
			while (list($b) = each($tab_general[$a])){
				echo "$b <br>";
			}
		}
?>

		<table border>
			<caption style="text-align:left">Liste des CREATE</caption>
			<tr>
				<th>Action</th>
				<th>Id</th>
				<th>Civilité</th>
				<th>Nom</th>
				<th>Prénom</th>
				<th>genre</th>			
				<th>login</th>
				<th>mot de passe</th>
				<th>e-mail</th>
				<th>global</th>
				<th>local_1</th>
				<th>local_2</th>
				<th>local_3</th>				
				<th>classe(s)</th>				
			</tr>
			<tr>
				<td>create</td>
				<td>111</td>
				<td>civilite</td>
				<td><?php echo $tab_general["create"]["11111"]["nom"] ?></td>
				<td><?php echo $tab_general["create"]["11111"]["prenom"] ?></td>
				<td><?php echo $tab_general["create"]["11111"]["genre"] ?></td>
				<td>login</td>
				<td>mdp</td>
				<td>email</td>
				<td title="il_global_111">global</td>
				<td title="il_local_1_111">loc_1</td>
				<td title="il_local_1_111">loc_2</td>
				<td title="il_local_1_111">loc_3</td>
				<td title="il_classe_111"><?php echo $tab_general["create"]["11111"]["classe"] ?></td>
			</tr>
			<tr>
				<td>create</td>
				<td>222</td>
				<td>civilite</td>
				<td><?php echo $tab_general["create"]["22222"]["nom"] ?></td>
				<td><?php echo $tab_general["create"]["22222"]["prenom"] ?></td>
				<td><?php echo $tab_general["create"]["22222"]["genre"] ?></td>
				<td>login</td>
				<td>mdp</td>
				<td>email</td>
				<td title="il_global_222">global</td>
				<td title="il_local_1_222">loc_1</td>
				<td title="il_local_2_222">loc_2</td>
				<td title="il_local_3_222">loc_3</td>
				<td title="il_classe_222"><?php echo $tab_general["create"]["22222"]["classe"] ?></td>
			</tr>
			<tr>
				<td>create</td>
				<td>333</td>
				<td>civilite</td>
				<td><?php echo $tab_general["create"]["33333"]["nom"] ?></td>
				<td><?php echo $tab_general["create"]["33333"]["prenom"] ?></td>
				<td><?php echo $tab_general["create"]["33333"]["genre"] ?></td>
				<td>login</td>
				<td>mdp</td>
				<td>email</td>
				<td title="il_global_333">global</td>
				<td title="il_local_1_333">loc_1</td>
				<td title="il_local_2_333">loc_2</td>
				<td title="il_local_3_333">loc_3</td>
				<td title="il_classe_333"><?php echo $tab_general["create"]["33333"]["classe"] ?></td>
			</tr>
		</table>
		
		         <br><hr><br>          
        <form method="POST" action="generXML.php">
            <input type="hidden" name="generer" id="generer" value="<?php echo $prepaXML_serial_slash?>">
            <input type="hidden" name="titre" id="titre" value="csv2xml pour ILIAS - Generation du XML">
            <button type="submit">Générer le XML</button>
        </form>             
            
    </body>
</html>